package blogs.eidos.cloud.framework.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * ID参数
 *
 * @author Eidos
 * @date 2018-11-08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "IdBaseDto", description = "基础ID查询对象")
public class IdBaseDto implements Serializable {
    private static final long serialVersionUID = -5353973980674510450L;

    @NotNull(message = "ID不能为空")
    @Digits(integer = 20,fraction = 1,message = "ID长度为1-20")
    @ApiModelProperty(value = "ID", required = true)
    private Long id;

}
